﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Blog.Core.Theme>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <script src="<%= ResolveUrl("~/Content/ContextScripts.js") %>" language="javascript" type="text/javascript" ></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<% if (Model.IsAdd)
   {%>
    <h2>Добавление новой темы</h2>
<% } else { %>
    <h2>Редактирование темы</h2>
<% } %>

    <% using (Html.BeginForm("Edit", "Home", FormMethod.Post, new { onsubmit = "return validateDescription()" }))
    {%>
    <%: Html.ValidationSummary(true)%>
        
    <fieldset>
        <div class="editor-label">
            Наименование: 
        </div>
            
        <div class="editor-field" id="themeheader-editor-field">
            <%= Html.TextBox("ThemeHeader")%>
            <br />
            <%: Html.ValidationMessageFor(m => m.ThemeHeader)%>
        </div>

        <div class="editor-label">
            Описание: 
        </div>
        <div class="editor-field" id="description-editor-field">
            <textarea id="Description" name="Description" rows="1" cols="1" ><%= Model.Description%></textarea>
        </div>
        <p>
            <input type="submit" value="Сохранить" />
        </p>
    </fieldset>

    <% } %>

    <%: Html.ActionLink("Назад", "Index", "Home", null, new Dictionary<string, object>() { { "class", "more" } })%>
    <br />
    <br />
    <br />
</asp:Content>

